Revert "[FFI][RUNTIME] Introduce runtime boxed types for int/float/bool"#17252
Merged
Revert "[FFI][RUNTIME] Introduce runtime boxed types for int/float/bool"#17252
Conversation
Lunderberg
approved these changes
Aug 7, 2024
Contributor
Lunderberg
left a comment
There was a problem hiding this comment.
Revert approved, and crossing fingers that resolving the performance overhead won't be too onerous.
Lunderberg
added a commit
to Lunderberg/tvm
that referenced
this pull request
Aug 8, 2024
…float/bool" (apache#17252)" This reverts commit 11be832.
Lunderberg
added a commit
to Lunderberg/tvm
that referenced
this pull request
Aug 8, 2024
Initially introduced in apache#16183, these changes were reverted in apache#17252 due to performance degredation in some Relax models. This could occur when a model contained a large number of calls to `"vm.builtin.tuple_getitem"`, which may occur when model weights are provided as a tuple. This PR re-applies the changes from apache#16183, but with the performance degredation resolved. The root cause was unnecessary type-checking when converting from an untyped `tvm::ArrayNode*` to the typed `tvm::Array<T>`, in the case where `T` is `ObjectRef`.
tqchen
pushed a commit
that referenced
this pull request
Aug 12, 2024
* Revert "Revert "[FFI][RUNTIME] Introduce runtime boxed types for int/float/bool" (#17252)" This reverts commit 11be832. * [FFI] Re-introduce the boxed primitive values Initially introduced in #16183, these changes were reverted in #17252 due to performance degredation in some Relax models. This could occur when a model contained a large number of calls to `"vm.builtin.tuple_getitem"`, which may occur when model weights are provided as a tuple. This PR re-applies the changes from #16183, but with the performance degredation resolved. The root cause was unnecessary type-checking when converting from an untyped `tvm::ArrayNode*` to the typed `tvm::Array<T>`, in the case where `T` is `ObjectRef`. * Correct typo from T to U
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #16183
see #16183 (comment) for context